<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="base" value="${pageContext.request.contextPath}" />
<html>
<head>
    <%@include file="common/common.jsp"%>
    <title>主页</title>
    <link rel="stylesheet" href="${base}/css/index.css" />
</head>
<body>
<!--顶部导航-->
<header class="mui-bar mui-bar-nav">
		<span class="schoolIcon">
			<i class="icon iconfont icon-student"></i>
			<i class="schoolTxt" data-id="${account.school_id}">
                <c:choose>
                    <c:when test="${account ne null}">
                        ${account.school_name}
                    </c:when>
                    <c:otherwise>
                        请选择学校...
                    </c:otherwise>
                </c:choose>

            </i>
		</span>
    <h1 id="title" class="mui-title">首页</h1>
</header>
<div id="slider" class="mui-slider mui-fullscreen">
    <div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
        <div class="mui-scroll">
            <c:if test="${typelist ne null}">
                <c:forEach items="${typelist}" var="classtype" varStatus="class_index">
                    <a class="mui-control-item <c:if test="${class_index.count eq 1}">mui-active</c:if>" data-id="${classtype.id}" href="#item1mobile" data-wid="tab-top-subpage-${class_index.count}.html">
                            ${classtype.typeName}
                    </a>
                </c:forEach>
            </c:if>
        </div>
    </div>
</div>
<div id="pullrefresh" class="mui-content mui-scroll-wrapper pullFresh">
    <div class="mui-scroll">
        <!--任务列表-->
        <div class="taskWrap">

        </div>
    </div>
</div>

<script id="tpl-order" type="text/html">
    {{each list as item}}
    <div class="taskList clearfix">
        <div class="taskTitle pull-left">
            <span>{{item.type_name}}</span>
        </div>
        <div class="taskImg pull-left">
            <img src="image/head_{{item.order_type}}.jpg" alt="" />
        </div>
        <div class="taskTxt pull-left">
            <span class="txtTitle">{{item.order_title}}</span>
            <span class="txtSubTitle">{{item.order_desc}}</span>
            <span class="taskAddress"><i class="icon iconfont icon-ditu"></i>{{item.re_address}}</span>
            <span class="taskTime"><i class="icon iconfont icon-shijian"></i>{{item.re_begin_time}}{{if item.re_end_time}}-{{/if}}{{item.re_end_time}}</span>
            <span class="taskNum"><i class="icon iconfont icon-shang"></i>{{item.amount}}元</span>
        </div>
        <div class="goto taskState pull-right" id="{{item.id}}">抢</div>
    </div>
    {{/each}}
</script>

<!--底部导航-->
<%@include file="common/footer.jsp"%>

<div class="maskScholl">
    <div class="schoolWrap mui-clearfix">
        <div class="mui-pull-left schoolNav">
            <ul>
                <c:if test="${sessionScope.wx_school_info ne null}">
                    <c:forEach varStatus="city_index" var="city" items="${sessionScope.wx_school_info}">
                        <li  class=="<c:if test="city_index.count eq 0 " >schoolNavActive</c:if>" >${city.title}</li>
                    </c:forEach>
                </c:if>
            </ul>
        </div>
        <c:if test="${sessionScope.wx_school_info ne null}">
            <c:forEach varStatus="city_index" var="city" items="${sessionScope.wx_school_info}">
                <div class="mui-pull-right schoolClass <c:if test="${city_index.count eq 1}" >schoolClassActive</c:if>">
                    <ul>
                        <c:forEach var="school" items="${city.tSchools}">
                            <li data-id="${school.id}">${school.school_name}</li>
                        </c:forEach>
                    </ul>
                </div>
           </c:forEach>
        </c:if>
    </div>
</div>
<script src="${base}/js/index.js"></script>
</body>
</html>